<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>display all books</title>
</head>
<body>
	
	<h2>书籍列表</h2>
	<table border="1" width="40%" style="text-align:center; margin:0 auto;">
		<tr>
			<td>书籍编号</td>
			<td>书名</td>
			<td>作者</td>
			<td>价格</td>
			<td>描述</td>
			<td>操作</td>
		</tr>
		<c:forEach items="${map}" var="me">
			<tr>
				<td>${me.key}</td>
				<td>${me.value.name}</td>
				<td>${me.value.author}</td>
				<td>${me.value.price}</td>
				<td>${me.value.description}</td>
				<td>
					<a href="${pageContext.request.contextPath}/BuyServlet?bookId=${me.key}&token=${token}">加入购物车</a>
				</td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>